import request from '../utils/request' //引入axios的封装方法
import cfg from '@/config/config'

const reservationApi = {
  // 查询访客预约记录
  findVisitList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/findVisitList', params)
  },
  // 获取实时访客数据
  getVisitorVisitCase: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorVisitCase', params)
  },
  // 按月查询访客数据--柱状图数据
  getVisitorVisitGraphs: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorVisitGraphs', params)
  },


  // 访客单位访问统计--查询数据
  getVisitorUnitList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorUnitList', params)
  },
  // 访客单位人次统计--查询数据
  getVisitorUnitManTimeList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVisitorUnitManTimeList', params)
  },
  // 获取所有部门
  getDtdepList: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getDtdepList')
  },
  // 获取所有访客单位名称
  getVisitCompanyList: () => {
    return request('get', cfg.apiUrl + 'api/visitor/getVisitCompanyList')
  },


  // 获取基地，// 参数 200
  getBdSysItemList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdSysItemList', params)
  },
  // 查询区域列表，参数基地id
  getVisitorTypeAreaList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getBdVisitAreaList', params)
  },


  // 被访者部门人次统计
  getDtDepManTimeList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getDtDepManTimeList', params)
  },



  // 查询车辆明细记录
  findSmartCartempList: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/findSmartCartempList', params)
  },
  // 获取车位实时数据
  getVehicleUsage: (params) => {
    return request('get', cfg.apiUrl + 'api/visitor/getVehicleUsage', params)
  },
  // 获取车位查询数据--柱状图数据
  getVehicleUsageGraph: (params) => {
    return request('post', cfg.apiUrl + 'api/visitor/getVehicleUsageGraph', params)
  },


  // 车辆权限管理-查询
  findDtAllcarsqList: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/findDtAllcarsqList', params)
  },
  // 车辆权限管理-新增，修改
  savaDtAllcarsq: (params) => {
    return request('post', cfg.apiUrl + 'api/parkingLot/savaDtAllcarsq', params)
  },
  // 获取车辆类型
  getVehicleTypeList: () => {
    return request('GET', cfg.apiUrl + 'api/parkingLot/getVehicleTypeList')
  },






  // 返回停车场数据
  getCarParkDate: () => {
    let arr =[
      {id:1,areaName:"安亭总部一期"},
      {id:2,areaName:"安亭总部二期"}
    ];
    return arr
  },



};

export default reservationApi;
